1. Function Description
The onstat application function is to read the shared memory structure and provide statistics on the instant when the command is executed. The shared memory content may change when onstat displays the output. The operation does not block the shared memory, so the operation will not be affected. It is an interactive system monitoring tool provided by Informix.
2 instructions
You can u
I. Common commandsOninit changes the system from off-line mode to on-line modeOninit-Iy (initialize the database and delete all dbspace and Chunk)Oninit-s (offline --> static)Onmode-ky offlineOnmode-s graceful shutdown --> quiescent (online to static, let the user finish processing)Onmode-u immediate shutdown --> quiescent (online to static, all users terminate immediately)Onmode-M quiescent ---> onlineOnmode-Z Sid deletes a sessionOnmode-l moves the currently used logic log downOnmode-C enforce
First, the common commandOnInit changes the system from off-line mode to on-line modeOninit-iy (Initialize database, delete all dbspace and chunk)Oninit-s (offline--> static)Onmode-ky offlineOnmode-s Graceful shutdown-->quiescent (online to static, let user process complete)Onmode-u Immediate shutdown-->quiescent (online to static, all users terminate immediately)Onmode-m quiescent--->onlineOnmode-z SID Deletes a sessionOnmode-l move the logical log currently in use downOnmode-c Force checkpoint
monitoring of virtual processors, you can use some system commands or database commands. the commonly used database commands are onstat-grea and onstat-g ioq.
The output of onstat-g rea is as follows:
/Usr/informix> onstat-g rea
Informix Dynamic Server Version 9.30.FC5 -- On-Line -- Up 36 days at 00:22:32-
-5352416 Kb
disk configuration is shown here (you can verify whether the correct device and connection are generated ). Including dbspace and Chunk. Omitted...
1. Continue restore? (Y/n) y2. Do you want to back up the logs? (Y/n) N------------------------------------ Enter the fastrecovery status (onstat-observation)/* The restoration starts at this time. The Restoration takes a long time and the percentage is not displayed. Please wait */
3. Restore a level 1 A
information: NBSP Database server type (primary, subordinate, or standard) The name of the other pairing database server NBSP;NBSP Whether data replication is running The value of the data replication parameter Onstat-gdri NBSP To get monitoring information for the entire data replication. NBSP Database server type NBSP;NBSP Data replication status (on, off, or off) paired database servers Latest data replication checkpoint NBSP
others from deleting the database. Opening a table generates a shared lock in the table to avoid changing it when using the table. In addition to dirty reads, a shared lock is placed on each read row. When a row is updated, deleted, or inserted, an additional lock is added to the index used by the row.
Here is an example: Update 1,000 rows with three indexes to generate 1,000 row locks, 3,000 index locks, and 4,002 database and table locks. The number of locks will soon exceed the default lock
database. Opening the table generates a shared lock in the table to avoid changing it when you use the table. In addition to dirty reads, a shared lock is placed on each row being read. And when you update, delete, or insert a row, additional locks are added to the index used by the row.
Here's an example: updating 1,000 rows with 3 indexes generates 1,000 row locks, 3,000 index locks, and 4,002 database and table locks. The number of locks will soon exceed the default lock-table structure in m
, and global pool. The allocation and release of memory pools is dynamic. The Memory pool allocation unit size is 8k. If a virtual segment is exhausted, the dynamic server can dynamically request it again based on the Onconfig parameter. The initial size of the virtual memory segment is determined by the parameter shmvirtsize, whose increment is determined by the parameter shmadd, but the entire shared memory segment cannot be larger than shmtotal.
If the client communicates with the server usi
can use the onparams command to change the physical and logical logs.
C: \ Informix> onparams --Usage: onparams-a-d
[-S
] [-I] |
-D-l
[-Y] |
-P-s
[-D
] [-Y]
-A-Add a logical log file
-I-Insert after current log
-D-Drop a logical log file
-P-Change physical log size and location
-Y-Automatically responds "yes" to all prompts
The above is the onparams help file. Next we will first change the loca
With the development of banking business, its database is also growing rapidly. Therefore, effectively controlling the database size and reasonably organizing tables can improve computer operation efficiency and reduce financial risks. As we all know, databases are composed of tables. In actual use, tables change dynamically, and some tables grow rapidly. When a table has more than eight staggered intervals in dbspace, the access efficiency of the table will be affected. As the number of stagger
with a read user to perform read operations on the database, which facilitates searching for problems.
Ii. Database consistency check
A. Log On with informixB. Set the database status to off_line.Onmode-kyUse onstat to check that the database status is off_lineC. Set the database status to single-user modeOnmode-sUse onstat-check that the database status is quiesentD. Check the database retention Page Sta
operations) select dbsname, tabname, (isreads + pagreads) diskreads, (iswrites + pagwrites) diskwrites from sysptprof order by 3 Desc, 4 desc those tables have fierce lock competition (the smaller the better) select. tabname, nrows, lockwts, deadlks from sysmaster: sysptprof a, Ables B where. tabname = B. tabname and lockwts> 0 and. dbsname = name and B. tabid> = 100 order by tabname; number of sequential scans of a table (the smaller the number of sequential scans of a large table, the better)
As we all know, the database is composed of tables, in practical use, the table is dynamic, and some tables are growing quickly. When a table in the Dbspace has more than 8 staggered intervals, it will affect its access efficiency, with the further increase in the staggered interval, and even become a bottleneck to access the database, often appear system turbulence phenomenon. It is characterized by slow response time, extended backup time, and Onstat
As we all know, the database is composed of tables, in practical use, the table is dynamic, and some tables are growing quickly. When a table in the Dbspace has more than 8 staggered intervals, it will affect its access efficiency, with the further increase in the staggered interval, and even become a bottleneck to access the database, often appear system turbulence phenomenon. It is characterized by slow response time, extended backup time, and Onstat
released dynamically. The memory pool size is 8 KB. If the virtual segments are exhausted, the dynamic server can dynamically apply again based on the onconfig parameter. The initial size of the virtual memory segment is determined by the shm1_size parameter, and its increment is determined by the SHMADD parameter. However, the size of the entire shared memory segment cannot exceed SHMTOTAL.
If the customer communicates with the server using the shared memory, the message segment is used as the
When OnLine users complain that their processes are suspended or cannot interact with OnLine users, run onstat-a to obtain essential information about the problem. Onstat is a utility provided by OnLine and is used to monitor system commands. It provides similar but more detailed statistics to the tb_Monitoronmonitor utility.
The most obvious reason for OnLine suspension is that the logical log is full and
32767. For changes to physical and logical logs, we can use the Onparams command to do so.
C:\Informix>onparams-- Usage: onparams -a-d -d-l -p-s -a -Addalogicallogfile -i -Insertaftercurrentlog -d -Dropalogicallogfile -p -Changephysicallogsizeandlocation -y -Automaticallyresponds"yes"toallprompts
Above is the Onparams help file, we first change the physical log location and size:
C:\Informix>onparams-p-s40000-dphydbs-y Shuttingdown,pleasewait... Initializing,pleasewait... Recovering,pleasewa
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.